home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 1966 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  1.4 KB

  1. Path: brasaap.iaehv.nl!not-for-mail
  2. From: rob@brasaap.iaehv.nl (Rob J. Nauta)
  3. Newsgroups: comp.lang.c++,comp.lang.pascal.delphi.misc,comp.os.ms-windows.programmer.tools.misc
  4. Subject: Re: C++ with Zapp vs. Delphi
  5. Date: 14 Jan 1996 18:38:49 +0100
  6. Organization: Fidelio Software
  7. Message-ID: <4dbf39$65@brasaap.iaehv.nl>
  8. References: <4d239o$b76@news.nstn.ca>
  9. NNTP-Posting-Host: localhost.iaehv.nl
  10. X-Newsreader: NN version 6.5.0 CURRENT #6
  11.  
  12. nstn181a@fox.nstn.ca (Pierre G. Boutquin) writes:
  13.  
  14. >In <4d0f4i$a64@cs6.rmc.ca>, clark-a@rmc.ca writes:
  15. ->What you can do in C, I can do in pascal.  There is no limitation if you 
  16. ->work-around.
  17.  
  18. >I thought there _were_ things you can't write in a strongly typed 
  19. >language that can written in a weakly typed language, such as the C 
  20. >standard library function malloc(size_t) which returns memory for any 
  21. >variable type you want.
  22.  
  23. True. In C you won't get an error if you do 
  24. if (malloc(1024) == 1) then ... even though malloc returns a pointer
  25. and you shouldn't compare it with an integer. But in Delphi you can
  26. typecast as well. Like C's 'x = (int *) y' you can do 
  27. x as TObject^ = getmem(1024), where getmem is pascal's alternative
  28. to malloc().
  29.  
  30. Rob
  31. -- 
  32.       -=*=-    | Across 50 states of mind, I didn't feel inclined. You waited
  33.   Rob J. Nauta    | yesterday, I didn't come your way. Now time is moving on,
  34.   rob@iaehv.nl    | I know it won't be long.  Till I'm shuffling away, with
  35.       -=*=-    | nothing more to say. (Ride - 'Going blank again')
  36.